﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DARE
{
    public class CLineEditData : CWidgetData
    {
        public bool passwordModeEnabled;
        public string text;
        public Vector2 scale;

        public override void FillDataStructure(CWidget wid)
        {
            CLineEdit w = wid as CLineEdit;
            base.FillDataStructure(wid);
            passwordModeEnabled = w.PasswordModeEnable;
            text = w.Text;
            scale = w.m_scale;
        }

        public override void FillFromDataStructure(ref CWidget wid, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref wid, hud);
            (wid as CLineEdit).PasswordModeEnable = passwordModeEnabled;
            (wid as CLineEdit).Add(text);
            (wid as CLineEdit).m_scale = scale;
        }
    }
}
